
<link rel="stylesheet" href="files/css/libs/foundation/foundation.min.css">
<link rel="stylesheet" href="files/css/libs/foundation/app.css">

<script src="files/js/libs/foundation/modernizr.foundation.js" ></script>
<!--<script src="files/js/libs/foundation/jquery.js" ></script>
-->


<style>
	 h1{
	 	text-align: center;
	 }
	 #header{
	 	margin-top: 150px;
	 	border-bottom: none;
	 }
</style>

<script>	

$(document).ready(function(){
	$('#username').click( function (){        
        $(".error").html("");
    });
    
    $('#userkey').click( function (){        
        $(".error").html("");
    });
});


/*var sa="{$contador}";
	var miliseconds = parseInt("{$contador}")*1000;
	
	function updateTicks(){
		miliseconds -= 1000;
		
		$(".error").html("Login deshablitado durante "+ parseInt(miliseconds/1000)+" segundos.");
		
		if ( miliseconds > 0 ){
			setTimeout(updateTicks, 1000);
			return true;
		}
		
		$("form#login").removeAttr("disabled");
	}

	$(document).ready(function(){
		
		console.log(sa, $(".error"));
		$(".error").html(sa);
		 
		if (!isNaN(miliseconds) )
		{
			setTimeout(function(){ updateTicks(); }, 1000);
			$("form#login").attr("disabled","disabled");
			//alert("ddads");
			
		/*	$.timer(1000, function(temporizador){
				alert("ddads");
				if ( miliseconds > 0 ){
					$(".error").html("Login deshablitado durante "+round(miliseconds/1000)+" segundos.");
				
					
					miliseconds -= 1000;
					//
				}
				else
					temporizador.stop();
			});			
			
		}
	});*/
</script>

<div class="row">
	
	<div class="five columns centered" >
		<div class="panel" style="margin-top: 180px">     
            
            <form class="form" id="login" name="login" action="public/login" method="post"> 
	        	<fieldset >			
	        		<legend style="background-color: transparent;">LOGIN</legend>
			       	<label>USUARIO:</label>
			        <input type="text" placeholder="user" class="twelve" id="username" name="username" autofocus="autofocus"/>
				    <label>CONTRASEÑA:</label>
				    <input type="password" placeholder="*******"class="twelve" id="userkey" name="userkey"/> 
			   </fieldset>
					    
			   <div class="row">
			   		<div class="twelve columns">
			   			<div class="row">
			   				<div class="three columns centered">			
								<input class="button" type="submit" value="Ingresar">
								
							</div>
			   			</div>
			   			
			   		</div>					
				</div>				   
			   
				<div class="row">
					<div class="six columns centered error" style="color:red; text-align: center;">			
						{$fail}
					</div>
				</div>	   	    
		   </form>	   	         	
                        				            
        </div>        
	</div>
	
</div>



<!--<div style="text-align: center;">
<form class="form" id="login" name="login" action="public/login" method="POST" style="width: auto !important; 
															margin: 0 auto;
															border: 1px solid black;
															border-radius: 10px;
															overflow: hidden;
															padding: 10px;
															margin-top: 180px;
															display: inline-block
															">
		<!--div style="display: inline-block; vertical-align: middle">
		{assign var="login_img_logo" value="files/images/logo.png"}
		{if $logo_img neq ''}
			{assign var="login_img_logo" value=$logo_img}
		{/if}
		<img src="{$login_img_logo}" />
	</div
	
	
	<div style="display: inline-block; vertical-align: middle">
		<div style="margin-top:25px;">
			<h1><center>Login</center></h1>
			<hr />
			
			<div class="field row">
				<label>Usuario:</label>
				<input class="textbox eight" autofocus="autofocus" type="text" name="username" />
			</div>
			<div class="field">
				<label>Contraseña:</label>
				<input class="textbox eight" type="password" name="userkey"  />
			</div>
			<div class="actions field">
				<input class="submit four" type="submit" value="Entrar"/>
			</div>

			<div class="error" style="color:red">
						{$fail}			
				
			</div>
		</div>
	</div>
</form>
</div>
-->